﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace WuDada.Core.Member.Domain
{
    /// <summary>
    /// 會員
    /// </summary>
    [Serializable]
    [DataContract]
    public class MemberVO
    {
        #region Constructor

        public MemberVO()
        {
            Status = "0";
            UserConfirm = "0";
        }

        #endregion

        #region Property

        /// <summary>
        /// PK
        /// </summary>
        [DataMember]
        public virtual int MemberId { get; set; }

        /// <summary>
        /// 登入帳號
        /// </summary>
        [DataMember]
        public virtual string LoginId { get; set; }

        /// <summary>
        /// 登入密碼
        /// </summary>
        [DataMember]
        public virtual string Password { get; set; }

        /// <summary>
        /// 會員姓名
        /// </summary>
        [DataMember]
        public virtual string Name { get; set; }

        /// <summary>
        /// 公司名稱
        /// </summary>
        [DataMember]
        public virtual string Company { get; set; }

        /// <summary>
        /// 統一編號
        /// </summary>
        [DataMember]
        public virtual string CompanyNo { get; set; }

        /// <summary>
        /// 部門
        /// </summary>
        [DataMember]
        public virtual string Dept { get; set; }

        /// <summary>
        /// 職稱
        /// </summary>
        [DataMember]
        public virtual string JobTitle { get; set; }

        /// <summary>
        /// 電話
        /// </summary>
        [DataMember]
        public virtual string Phone { get; set; }

        /// <summary>
        /// 手機
        /// </summary>
        [DataMember]
        public virtual string Mobile { get; set; }

        /// <summary>
        /// 傳真
        /// </summary>
        [DataMember]
        public virtual string Fax { get; set; }

        /// <summary>
        /// 電子郵件
        /// </summary>
        [DataMember]
        public virtual string Email { get; set; }

        /// <summary>
        /// 申請日期
        /// </summary>
        [DataMember]
        public virtual DateTime? CreatedDate { get; set; }

        /// <summary>
        /// 更新日期
        /// </summary>
        [DataMember]
        public virtual DateTime? UpdatedDate { get; set; }

        /// <summary>
        /// 留言者IP
        /// </summary>
        [DataMember]
        public virtual string CreateIP { get; set; }

        /// <summary>
        /// 性別
        /// </summary>
        [DataMember]
        public virtual string Sex { get; set; }

        /// <summary>
        /// 狀態. 0.審核中 1.審核通過 2.審核不通過
        /// </summary>
        [DataMember]
        public virtual string Status { get; set; }

        /// <summary>
        /// 使用者確認狀態. 0.未確認 1.已確認
        /// </summary>
        [DataMember]
        public virtual string UserConfirm { get; set; }

        /// <summary>
        /// UserConfirm用的Token
        /// </summary>
        [DataMember]
        public virtual string Token { get; set; }

        /// <summary>
        /// 需求 ex: 出租鐵門;下廣告
        /// </summary>
        [DataMember]
        public virtual string Requirement { get; set; }

        /// <summary>
        /// 縣市
        /// </summary>
        [DataMember]
        public virtual string City { get; set; }

        /// <summary>
        /// 地區
        /// </summary>
        [DataMember]
        public virtual string Area { get; set; }

        /// <summary>
        /// 路等地址
        /// </summary>
        [DataMember]
        public virtual string Road { get; set; }

        /// <summary>
        /// 接受電子報狀態. 0.否 1.是
        /// </summary>
        [DataMember]
        public virtual string ReceiveEpaper { get; set; }

        /// <summary>
        /// 公司負責人
        /// </summary>
        [DataMember]
        public virtual string CompanyCharge { get; set; }

        /// <summary>
        /// 公司電話
        /// </summary>
        [DataMember]
        public virtual string CompanyPhone { get; set; }

        /// <summary>
        /// 公司傳真
        /// </summary>
        [DataMember]
        public virtual string CompanyFax { get; set; }

        /// <summary>
        /// 公司縣市
        /// </summary>
        [DataMember]
        public virtual string CompanyCity { get; set; }

        /// <summary>
        /// 公司地區
        /// </summary>
        [DataMember]
        public virtual string CompanyArea { get; set; }

        /// <summary>
        /// 公司路等地址
        /// </summary>
        [DataMember]
        public virtual string CompanyRoad { get; set; }

        /// <summary>
        /// 銀行名稱
        /// </summary>
        [DataMember]
        public virtual string Bank { get; set; }

        /// <summary>
        /// 銀行匯款帳戶
        /// </summary>
        [DataMember]
        public virtual string BankAccount { get; set; }

        /// <summary>
        /// 銀行戶頭名稱
        /// </summary>
        [DataMember]
        public virtual string BankTitle { get; set; }

        [DataMember]
        public virtual string Address
        {
            get
            {
                return City + Area + Road;
            }
        }

        public virtual string GetStr_Status
        {
            get
            {
                string result = string.Empty;
                switch (this.Status)
                {
                    case "0":
                        result = "審核中";
                        break;
                    case "1":
                        result = "審核通過";
                        break;
                    case "2":
                        result = "審核不通過";
                        break;
                }

                return result;
            }
        }

        public virtual string GetStr_UserConfirm
        {
            get
            {
                string result = string.Empty;
                switch (this.UserConfirm)
                {
                    case "0":
                        result = "未確認";
                        break;
                    case "1":
                        result = "已確認";
                        break;
                }

                return result;
            }
        }

        public virtual string GetStr_ReceiveEpaper
        {
            get
            {
                string result = string.Empty;
                switch (this.ReceiveEpaper)
                {
                    case "0":
                        result = "否";
                        break;
                    case "1":
                        result = "是";
                        break;
                }

                return result;
            }
        }

        #endregion
    }
}
